<!DOCTYPE html>
<html lang="zh-CN">
		<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta name="viewport" content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=no;">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<meta name="format-detection" content="telephone=no">
		 <link rel="stylesheet" href="/assets/css/follow.css"/>
		<title>H5投票</title>
		<style>
		  body{color: #2F2F2F;font-family: Avenir, -apple-system-font,微软雅黑, sans-serif;letter-spacing: 1px;}
		  li{font-size:14px;list-style: none;border-bottom: 1px solid #C4BCBC;padding-top:5px;padding-bottom: 5px;}
		  li span{padding-left:5px;}
		  .check-box{width:20px;height:20px;}
		  .titleVote{background-color:#FAFAFA;margin-top:5px;text-align:center;font-size:15px;padding-top:5px;padding-bottom: 5px;}
		</style>
	</head>
	
	<body style="margin-left:10px;margin-right:10px;" >
		<input type="hidden" value="${id!''}" id="question_id"/>
		<div id="content">
		
		</div>
		  
	</body>
	<script src="/assets/js/jquery-2.0.3.min.js"></script>
	
	<script>
		$(function(){
			$("#content").load("/question/findById?id="+$("#question_id").val());
			$("#content").on("click","[name='vote']",function(){
				var optionid = $(this).val();
				$.post("/question/vote",{questionnaireid:$("#questionid").val(),optionid:optionid},function(data){
					if(data.code==200){
						$("#content").load("/question/findById?id="+$("#question_id").val());
						alert('投票成功')
					}else{
						alert(data.message);
					}
				});
			})
		});
	</script>
</html>